import request from "./request";
const api = {
  Login: "/user/login",
  getType: "/class/getType",
  goodAreaStatistic: "/good/goodAreaStatistic",
};
export function loginIn(params) {
  return request({
    url: api.Login,
    method: "post",
    data: params,
  });
}
export function getType(params) {
  return request({
    url: api.getType,
    method: "get",
    data: params,
  });
}
// 产品订购排行
export function postGoodOrderRank (params) {
    return request({
        url: '/good/goodNameStatistic',
        method: 'post',
        data: params
    })
}
//订单变化趋势
export function postOrderDateStatistic (params) {
    return request({
        url: '/order/orderDateStatistic',
        method: 'post',
        data: params
    })
}
//首页初始化数量
export function orderDashboard (params) {
    return request({
        url: '/order/orderDashboard',
        method: 'post',
        data: params
    })
}
//订单表格

export function queryOrder (params) {
    return request({
        url: '/order/queryOrder',
        method: 'post',
        data: params
    })
}
//获取订单状态
export function getDicByTyp (params) {
    return request({
        url: '/dictionary/getDicByType',
        method: 'post',
        data: params
    })
}
export function getGoodByGoodId(params){
    return request({
        url: '/good/getGoodByGoodId',
        method: 'post',
        data: params
    })
}
export function getDeliverByGoodId(params){
    return request({
        url: '/deliverable/getDeliverByGoodId',
        method: 'post',
        data: params
    })
}
export function getPic (url, params) {
    return request({
        url: url,
        method: 'get',
        data: params
    })
}
export function getDicByType (params) {
    return request({
        url: '/class/getType',
        method: 'get',
        data: params
    })
}
export function queryMerchandise ( params) {
    return request({
        url: '/merchandise/queryMerchandise',
        method: 'get',
        data: params
    })
}
export function getMerchandise ( params) {
    return request({
        url: '/merchandise/updateMerchandise',
        method: 'get',
        data: params
    })
}
export function getMerById ( params) {
    return request({
        url: '/merchandise/getMerById',
        method: 'get',
        data: params
    })
}
// 商品编辑-删除标题图片
export function getTitlePicDelete (params) {
    return request({
        url: '/merchandise/deleteTitlePicture',
        method: 'get',
        data: params
    })
}
// 商品编辑-删除样例图片
export function getDemoPicDelete (params) {
    return request({
        url: '/merchandise/deletePicture',
        method: 'get',
        data: params
    })
}
